//
//  DPModel.m
//  项目A
//
//  Created by lanou3g on 15/8/31.
//  Copyright (c) 2015年 王钧. All rights reserved.
//

#import "DPModel.h"

@implementation DPModel

// 直接将字典内容对应赋值到属性中
+ (instancetype)DPModelSetValuesForKeysWithDictionary:(NSDictionary *)dictionary
{
    return  [[DPModel alloc]initSetValuesForKeysWithDictionary:dictionary];
}
// 初始化字典的方法
- (instancetype)initSetValuesForKeysWithDictionary:(NSDictionary *)dictionary
{
    self = [super init];
    if (self) {
        self.data = [NSMutableArray new];
        
        [self setValuesForKeysWithDictionary:dictionary];
    }
    return self;
}


- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqualToString:@"description"]) {
        self.Description = value;
    }else if ([key isEqualToString:@"id"])
    {
        self.ID = value;
    }
}

@end
